package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.pojo.Sport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@Mapper
public interface SportMapper extends BaseMapper<Sport> {

    @Select("select * from sport")
    List<Sport> getAllSports();

    @Select("select * from sport where sport_id = #{sportId}")
    List<Sport> getSportById(@Param("sportId") Long sportId);
}
